﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using HK2009.EntityQuery;

namespace HK2009.BusinessFacade
{
    public interface IBNTruckHandler
    {
        /// <summary>
        /// 根据sql语句同参数获取列表
        /// </summary>
        /// <param name="sqlStr"></param>
        /// <param name="parms"></param>
        /// <returns></returns>
        DataTable GetList(string sqlStr, SqlParameter[] parms);

        /// <summary>
        /// 根据ID删除记录
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        bool DeleteByID(int pkid);


        /// <summary>
        /// 根据ID获取记录
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        BN_TruckQuery GetTruckByID(int pkid);


        /// <summary>
        ///  更改记录
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        bool UpdateTruck(BN_TruckQuery query);


        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        bool AddTruck(BN_TruckQuery query);
        bool AddTruck(BN_TruckQuery query, ref int pkid);

        /// <summary>
        /// 根据客户获取属于该客户的所有车辆
        /// </summary>
        /// <param name="clientID"></param>
        /// <returns></returns>
        DataTable GetTruckList(int clientID);
    }
}
